<template>
	<view class="box" :class="value?'active':''" @click="handleClick">
		<view class="icon">
			<u-icon name="checkbox-mark" color="#FFFFFF" size="16"></u-icon>
		</view>
	</view>
</template>
<script>
	export default {
		props: {
			value: {
				type: Boolean,
				default: () => false
			}
		},
		methods: {
			handleClick() {
				this.$emit('input', !this.value);
				this.$emit('click', !this.value);
			}
		}
	}
</script>
<style lang="scss" scoped>
	.box {
		width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		border: 1px solid #BDBDBD;
		.icon {
			display: none;
		}
	}

	.box.active {
		border-color: #FD8F19;
		background-color: #FD8F19;
		.icon{
			display: block;
		}
	}
</style>
